<template>
    <div ref="scroll">
        <!-- 借助于分发组件技术-实现的功能性复用 -->
        <slot></slot>
    </div>
</template>

<script>
import BScroll from 'better-scroll';
export default {
    methods:{
        initScroll(){
            this.$nextTick(()=>{
                new BScroll(this.$refs.scroll,{
                    click:true
                });
            });
        }
    },
    mounted(){
        this.initScroll();
    }
}
</script>